Management of a plurality of graphic cards

ABSTRACT

The invention notably relates to a computer-implemented method for modifying a number of graphic cards used for rendering a scene, a graphic card comprising one or more graphic processing units. The method comprises providing a scene that is already loaded in a render engine, the scene comprising at least one graphic data to be used for rendering a view of the scene; modifying an abstract graphic resource for a graphic resource of the at least one graphic data, the abstract graphic resource storing an identifier of the graphic resource for each graphic card, by adding a new identifier of the said graphic resource for each newly added graphic card; transferring, on each newly added graphic card, the said at least one graphic data already stored on one of the graphic cards.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority under 35 U.S.C. §119 or 365 to European Application No. 15307165.9, filed Dec. 29, 2015. The entire contents of the above application(s) are incorporated herein by reference.

FIELD OF THE INVENTION

The invention relates to the field of computer programs and systems, and more specifically to a method, system and program for managing a plurality of graphic cards.

BACKGROUND

Computer Graphics techniques for rendering a three-dimensional (3D) scene aim at drawing the 3D scene on a display device such as a computer screen, a television, a projector, . . . Rendering a 3D scene is also referred to as 3D rendering.

Computer Graphics techniques for 3D rendering rely on hardware and software components that interact one each other's, and these components form an architecture dedicated to 3D rendering. The main hardware component of this architecture is the Graphic Card (GC) that is an accelerator designed to make some type of calculation faster. The GC is specialized in graphics computations such as converting a triangle into pixels. The GC comprises one or more Graphic Processing Units (GPUs); a GPU is a chip that performs the graphics computations of the GC. The GC can be connected to one or several display devices that display the result of the 3D rendering. Instructions to the GC and the GPU are sent through a Graphic Library (GL) that is a computer program library designed to aid in rendering computer graphics to a monitor. The GL is executed (or run) by the Central Processing Unit (CPU) of the computer hosting the GC. The two most famous GL are DirectX© and OpenGL©. In practice, the GL is not written by the hardware manufacturer, but rather by a third party that will developed the GL in accordance with the hardware specifications provided by the hardware manufacturer. A Render Engine (RE) is a framework that takes a 3D scene as an input and draw it to the screen with the use of one or more GC (in case of Multi Graphic Card rendering). The 3D scene is created by an application that uses the RE framework. The RE translates information provided by the application into Graphics Resources (GR). A GR is an object furnished by the GL on which operations can be performed such buffers, textures . . . Graphic Driver (GD), is a computer program that provides an interface to allow communications between the Operating System (OS) and the GC. In practice, GD are provided by GC manufacturers.

Multi GC rendering is the ability for an application to render a scene with the use of several GCs, plugged in on a same motherboard. Despite Multi GC principles are recent, only few applications use it because it involves a lot of complexity in the RE framework.

There are two common techniques to achieve multi Graphic Card rendering. Both rely on the Graphic Driver work and not on the Render Engine framework. The first technique uses SLI™ that was developed by nVIDIA™ or CrossFire™ that was developed by AMD™. Basically, when the RE of an application is rendering one frame, the RE uses the GL as if there was only one GC inside the computer. The RE is not aware that there are several GCs. The GD receives the orders and spread them to the GC. This illustrated on FIG. 1 that shows an example of a computer with two GCs wherein one GC renders the upper part of the screen and the second GC renders the bottom part. The RE receives from the application orders that are translated into GR (e.g. buffer, textures . . . ) received by the GL, which in turn sends orders for one GC. The GD managing the two cards (GC1, GC2) creates orders for the two GC using the SLI™/CrossFire™ technologies so that each GPU of each GC (GPU 1 of GC1, GPU2 of GC2) knows what information to process.

The second technique is based on the first one and is referred to as Mosaic mode. The Mosaic mode describes the ability to render at a higher resolution, using the display driver to spread the result to multiple screens. The combination of the Mosaic mode with the first techniques discussed above provides the capability for each GC to handle a separate display.

These first and second techniques are mostly used in game applications to improve performances or in flying simulator to output to more than one display with reasonable performances.

In addition to these two techniques, another technique provides specific Multi GCs by exposing rendering features by the GL. This technical is however experimental and not exploited by the hardware and software manufacturers.

These techniques of multi GCs rendering suffers several drawbacks. The first one is that they are limited to specific scenarios: the Mosaic mode for multiscreen rendering and SLI™/CrossFire™ for video games. Indeed, these techniques rely on the GD capabilities to dispatch orders to the GCs; however, the GD do not know at each time all the information required for performing the dispatch so that these solutions apply on few scenarios retained by the application developers. For instance, in a non-retained scenario only one GC is used; the application cannot benefit of the computing resources of the other GCs.

Another limitation is that these techniques are limited to one point of view on the rendered 3D scene. Hence, it is not possible to exploit the computing resources of the GPU for computing in parallel several viewpoints, which would improve the display speed of the 3D scene when changing of viewpoint.

A further limitation is that it is not possible to address a particular order to a particular GC, and it is not possible to expose this particular order to the RE. As explained above, the RE is not aware that there are several GCs.

Within this context, there is still a need for an improved management of multiple GCs. Notably, the management should allow selecting the one or more GCs involved during the rendering.

SUMMARY OF THE INVENTION

It is therefore provided a computer-implemented method for modifying a number of graphic cards used for rendering a scene. A graphic card comprises one or more graphic processing units. The method providing a scene that is already loaded in a render engine, the scene comprising at least one graphic data to be used for rendering a view of the scene; modifying an abstract graphic resource for a graphic resource of the at least one graphic data, the abstract graphic resource storing an identifier of the graphic resource for each graphic card, by adding a new identifier of the said graphic resource for each newly added graphic card; transferring, on each newly added graphic card, the said at least one graphic data already stored on one of the graphic cards.

The method may comprise one or more of the following:

-   -   the transfer, on each newly added graphic card, of the said at         least one graphic data already stored on one of the graphic         cards comprises: selecting one of the graphic cards that stores         the said at least one graphic data; retrieving, on a GPU of the         selected graphic card, data of the said at least one graphic         data; and copying the data obtained from the GPU to each newly         added graphic card;     -   the Render Engine comprises at least two logical layers, an         upper layer providing to an application with access to the         Render Engine and a lower layer providing the Render Engine with         access to a graphic library, and wherein the modification of the         abstract graphic resource is performed by an abstract layer         comprised between the upper layer and the lowest layer;     -   the transfer further comprises, after the selection of one of         the graphic cards: requesting, by the graphic library, data on         the GPU of the selected graphic card; and wherein the data of         the said at least one graphic data is retrieved on the GPU of         the selected graphic card as a result of the request of the         graphic library;     -   before the modification of the abstract graphic resource:         accessing on the graphic library, by the lower layer, an         identifier for each newly added graphic card; and providing the         identifier of each newly added graphic card to the abstract         layer;     -   the modified abstract graphic resource stores the identifier of         the graphic resource with the provided identifier(s);     -   the step of modifying the abstract graphic resource further         comprises modifying a table that stores the abstract graphic         resource; and wherein the modification of the abstract graphic         resource comprises providing to the Render Engine with an access         to the table that stores the abstract graphic resource to be         modified.

It is further provided a Render Engine computer program comprising instructions for performing the above

It is further provided a computer readable storage medium having recorded thereon the Render Engine computer program.

It is further provided a system comprising processing circuitry coupled to a memory, the memory having recorded thereon the Render Engine computer program.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the invention will now be described, by way of non-limiting example, and in reference to the accompanying drawings, where:

FIG. 1 shows a flowchart of a prior art method for performing a multi GC display;

FIG. 2 shows a flowchart of an example of the invention;

FIG. 3 shows an example of the creation of a table for handling abstract graphic resources;

FIG. 4 shows an example of the creation abstract graphic resources;

FIG. 5 shows an example of a table for the management of abstract graphic resources;

FIG. 6 shows an example of operations performed on graphic data; and

FIG. 7 shows an example of a computer system.

DETAILED DESCRIPTION OF THE INVENTION

With reference to the flowchart of FIG. 2, it is proposed a computer-implemented method for managing a plurality of Graphic Cards (GCs) used for rendering a scene. A GC can comprise one or more Graphic Processing Units (GPUs). The method comprises providing a scene that is already loaded in a Render Engine. The scene may be a three-dimensional (3D) scene. The scene comprises one or more graphic data that are used for rendering a view of the scene. The method further comprises modifying an abstract graphic resource for the at least one graphic data. The abstract graphic resource stores an identifier of a given graphic resource of the 3D scene for each graphic card involved in the rendering of the 3D scene. The modification of the abstract graphic resource is performed by adding a new identifier of the graphic resource for each newly added graphic card. The method also comprises transferring, on each newly added graphic card, the said one or more graphic data already stored on one of the graphic cards.

Such a method improves the management of multiple Graphic Cards (GCs) while using current Graphic Libraries (GL). Notably, the present invention allows to add one or more further graphic cards while the application is running. For instance, if an application draws a tree from two different points of view on two Graphic Cards, the Graphic Resource of the tree needs to be on both Graphic Card. On the first Graphic Card, the buffer will have a Resource Name N1 and in the second a Resource Name N2. This introduces a lot of complexity because each part of the Render Engine must handle this complexity and duplicate all rendering orders to deal with both Graphic Cards. Now, taking the same example with six further points of view to be rendered, it becomes very tricky (i) to manage the six Resource Names for the single object “tree”, and (ii) to add six further graphic cards participating to the rendering. The present invention uses an Abstract Graphic Resource for each Graphic Resources so that the Render Engine only manipulates an Abstract Graphic Resource for the graphic data, instead of manipulating a Resource Name. Hence, given that the Render Engine is given access to the Abstract Graphic Resource, each inner order (e.g. of an application requesting to the Render Engine a specific display) is modified by replacing the Graphic Card-specific Resource Name by its matching Abstract Handle. The Render Engine does no more deal with the above-mentioned complexity and does not need any more duplicating all rendering orders it receives. As a result, it becomes feasible to add a new graphic card and switch to from a graphic card to several graphic cards. Additional advantages will be discussed hereinafter.

The method is computer-implemented. This means that the steps (or substantially all the steps) of the method are executed by at least one computer, or any system alike. Thus, steps of the method are performed by the computer, possibly fully automatically, or, semi-automatically. In examples, the triggering of at least some of the steps of the method may be performed through user-computer interaction. The level of user-computer interaction required may depend on the level of automatism foreseen and put in balance with the need to implement user's wishes. In examples, this level may be user-defined and/or pre-defined.

A typical example of computer-implementation of the method is to perform the method with a system adapted for this purpose. The system may comprise a processor coupled to a memory, and a plurality of graphic cards. A Render Engine and data representing a scene may be stored on the memory, and the Render Engine may run on the CPU. More generally, the memory may have recorded thereon a computer program comprising instructions for performing the method. The memory may also store a database. The memory is any hardware adapted for such storage, possibly comprising several physical distinct parts (e.g. one for the program, and possibly one for the database). By “database”, it is meant any collection of data (i.e. information) organized for search and retrieval (e.g. a relational database, e.g. based on a predetermined structured language, e.g. SQL). When stored on a memory, the database allows a rapid search and retrieval by a computer. Databases are indeed structured to facilitate storage, retrieval, modification, and deletion of data in conjunction with various data-processing operations. The database may consist of a file or set of files that can be broken down into records, each of which consists of one or more fields. Fields are the basic units of data storage. Users may retrieve data primarily through queries. Using keywords and sorting commands, users can rapidly search, rearrange, group, and select the field in many records to retrieve or create reports on particular aggregates of data according to the rules of the database management system being used.

The method manipulates graphic data, e.g. a graphic data may be a modeled object. The modeled object may be defined by different kinds of data, e.g. CAD object, PLM object, PDM object, CAE object, CAM object, CAD data, PLM data, PDM data, CAM data, CAE data. The graphic data is any data for representing a modeled object.

For instance, in the context of a 3D scene obtained by using a CAD system, a modeled object may typically be a 3D modeled object, e.g. representing a product such as a part or an assembly of parts, or possibly an assembly of products. By “3D modeled object”, it is meant any object which is modeled by data allowing its 3D representation. A 3D representation allows the viewing of the part from all angles. For example, a 3D modeled object, when 3D represented, may be handled and turned around any of its axes, or around any axis in the screen on which the representation is displayed. This notably excludes 2D icons, which are not 3D modeled. The display of a 3D representation facilitates design (i.e. increases the speed at which designers statistically accomplish their task). This speeds up the manufacturing process in the industry, as the design of the products is part of the manufacturing process. The 3D modeled object may represent the geometry of a product to be manufactured in the real world subsequent to the completion of its virtual design with for instance a CAD software solution or CAD system, such as a (e.g. mechanical) part or assembly of parts, or more generally any rigid body assembly (e.g. a mobile mechanism). A CAD software solution allows the design of products in various and unlimited industrial fields, including: aerospace, architecture, construction, consumer goods, high-tech devices, industrial equipment, transportation, marine, and/or offshore oil/gas production or transportation. The 3D modeled object designed by the method may thus represent an industrial product which may be any mechanical part, such as a part of a terrestrial vehicle (including e.g. car and light truck equipment, racing cars, motorcycles, truck and motor equipment, trucks and buses, trains), a part of an aerial vehicle (including e.g. airframe equipment, aerospace equipment, propulsion equipment, defense products, airline equipment, space equipment), a part of a naval vehicle (including e.g. navy equipment, commercial ships, offshore equipment, yachts and workboats, marine equipment), a general mechanical part (including e.g. industrial manufacturing machinery, heavy mobile machinery or equipment, installed equipment, industrial equipment product, fabricated metal product, tire manufacturing product), an electro-mechanical or electronic part (including e.g. consumer electronics, security and/or control and/or instrumentation products, computing and communication equipment, semiconductors, medical devices and equipment), a consumer good (including e.g. furniture, home and garden products, leisure goods, fashion products, hard goods retailers' products, soft goods retailers' products), a packaging (including e.g. food and beverage and tobacco, beauty and personal care, household product packaging).

By PLM, it is additionally meant any system adapted for the management of a modeled object representing a physical manufactured product (or product to be manufactured). In a PLM system, a modeled object is thus defined by data suitable for the manufacturing of a physical object. These may typically be dimension values and/or tolerance values. For a correct manufacturing of an object, it is indeed better to have such values.

By CAM, it is additionally meant any solution, software of hardware, adapted for managing the manufacturing data of a product. The manufacturing data generally includes data related to the product to manufacture, the manufacturing process and the required resources. A CAM solution is used to plan and optimize the whole manufacturing process of a product. For instance, it can provide the CAM users with information on the feasibility, the duration of a manufacturing process or the number of resources, such as specific robots, that may be used at a specific step of the manufacturing process; and thus allowing decision on management or required investment. CAM is a subsequent process after a CAD process and potential CAE process. Such CAM solutions are provided by Dassault Systèmes under the trademark DELMIA®.

By CAE, it is additionally meant any solution, software of hardware, adapted for the analysis of the physical behavior of modeled object. A well-known and widely used CAE technique is the Finite Element Method (FEM) which typically involves a division of a modeled objet into elements which physical behaviors can be computed and simulated through equations. Such CAE solutions are provided by Dassault Systemes under the trademark SIMULIA®. Another growing CAE technique involves the modeling and analysis of complex systems composed a plurality components from different fields of physics without CAD geometry data. CAE solutions allows the simulation and thus the optimization, the improvement and the validation of products to manufacture. Such CAE solutions are provided by Dassault Systemes under the trademark DYMOLA®.

PDM stands for Product Data Management. By PDM solution, it is meant any solution, software of hardware, adapted for managing all types of data related to a particular product. A PDM solution may be used by all actors involved in the lifecycle of a product: primarily engineers but also including project managers, finance people, sales people and buyers. A PDM solution is generally based on a product-oriented database. It allows the actors to share consistent data on their products and therefore prevents actors from using divergent data. Such PDM solutions are provided by Dassault Systemes under the trademark ENOVIA®.

FIG. 7 shows an example of a system; the system is a computer system, e.g. a workstation of a user.

The system of the example comprises a central processing unit (CPU) 1010 connected to an internal communication BUS 1000, a random access memory (RAM) 1070 also connected to the BUS. The system is further provided with a graphical processing unit (GPU) 1110 which is associated with a video random access memory 1100 connected to the BUS. Video RAM 1100 is also known in the art as frame buffer. A mass storage device controller 1020 manages accesses to a mass memory device, such as hard drive 1030. Mass memory devices suitable for tangibly embodying computer program instructions and data include all forms of nonvolatile memory, including by way of example semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM disks 1040. Any of the foregoing may be supplemented by, or incorporated in, specially designed ASICs (application-specific integrated circuits). A network adapter 1050 manages accesses to a network 1060. The system may also include a haptic device 1090 such as cursor control device, a keyboard or the like. A cursor control device is used in the system to permit the user to selectively position a cursor at any desired location on display 1080. In addition, the cursor control device allows the user to select various commands, and input control signals. The cursor control device includes a number of signal generation devices for input control signals to system. Typically, a cursor control device may be a mouse, the button of the mouse being used to generate the signals. Alternatively or additionally, the system may comprise a sensitive pad, and/or a sensitive screen.

The computer program may comprise instructions executable by a computer, e.g. the system of FIG. 7. The instructions of the computer program cause the above system to perform the method. The program may be recordable on any data storage medium, including the memory of the system. The program may for example be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or in combinations of them. The program may be implemented as an apparatus, for example a product tangibly embodied in a machine-readable storage device for execution by a programmable processor. Method steps may be performed by a programmable processor executing a program of instructions to perform functions of the method by operating on input data and generating output. The processor may thus be programmable and coupled to receive data and instructions from, and to transmit data and instructions to, a data storage system, at least one input device, and at least one output device. The application program may be implemented in a high-level procedural or object-oriented programming language, or in assembly or machine language if desired. In any case, the language may be a compiled or interpreted language. The program may be a full installation program or an update program. Application of the program on the system results in any case in instructions for performing the method.

Referring back to the flowchart of FIG. 2, it is discussed an example of the computer-implemented method for managing a plurality of Graphic Cards according to the invention.

A step S200, a three-dimensional (3D) scene is provided; the 3D scene is loaded in a Render Engine (RE). The 3D scene comprises at least one graphic data to be used for rendering a view of the 3D scene. A Render Engine (also referred to as Rendering Engine) is a framework that generates images to be displayed upon application's request. For instance, a CAD application of CAD system provides to the Render Engine a 3D scene of 3D modeled objects as input and the Render Engine draws the 3D scene to the screen with the use of one or more Graphic Cards of the CAD system. The framework is implemented as a software component that takes as input data that an application requests to be displayed and that outputs images that can be displayed.

A typical Render Engine contains several logical layers of code for hiding the implementation details of the Render Engine, as known in the art. Each layer provides a set of functionality and interfaces for communicating with other layers, hardware component of the system, or an application executed by the system. The number of logical layer may vary. The upper layer n relies on the layer n−1 and so on. A layer n−1 is closer to the hardware than a layer n.

In an example of the invention, the Render Engine comprises at least three logical layers; namely an upper, a lower and abstract layers. The upper layer aims at providing to an application (e.g. a CAD application) with access to the Render Engine, e.g. the upper layer comprises interfaces such API. The upper layer can be accessed by the application itself to provide the 3D scene. The lower layer provides the Render Engine with an access to the Graphic Library that is a computer program library designed to aid in rendering computer graphics to a display, as known in the art. The abstract layer is between the upper and lower layers and aims at managing Abstract Graphic Resource created. Only the lowest layer has access to the Resource Names of the Graphic Resources, and only the upper layer deals with the Abstract Graphic Resource(s).

The Render Engine is typically a computer program that is referred to as Render Engine computer program. The Render Engine is therefore executed when the steps of the method are carried out.

Loading the 3D scene in the Render Engine means that the data (e.g. a file) representing the 3D scene is provided to the Render Engine, that is, the Render Engine can access the data and perform computation on it. The expression 3D scene means a 3D space in which at least one 3D model is placed. For a system standpoint, a scene is a file that comprises at least one Graphic Data to be used for rendering a view of the 3D scene.

In reference now to FIG. 3, the creation of an Abstract Graphic Resource is now discussed.

Once a 3D scene have been loaded in a render engine (S300) an Abstract Graphic Resource is created (S310) for the at least one graphic data of the 3D scene loaded at step S300. The creation may be performed by the abstract layer discussed previously. The Abstract Graphic Resource stores an identifier of a Graphic Resource for at least one of Graphic Card. The Graphic Resource is a data displayable by the Graphic Card: it is computed by the Graphic Library from the Graphic data previously loaded. The transformation of the graphic data into a Graphic Resource is carried out as known in the art. A Graphic Data is typically a binary asset storing a geometry to be displayed and it may further comprise optional parameters for describing this geometry such as texture, buffer, lighting, shading information, viewpoint . . . From a Graphic Library standpoint, a Graphic Resource can be, but is not limited to, a geometry, a buffer, a texture, a framebuffer, a sampler, a shader, viewpoint . . . The scene comprises at least one Graphic Data to be used for rendering a view of the scene, being understood that a typical scene generally comprises thousands of Graphic Data.

Thus, the step S310 comprises performing an identification of the same Graphic Resource (of the graphic data of the loaded scene) for each Graphic Card of the system, and the set of identified Graphic Resources is itself identified with the Abstract Graphic Resource that acts as a unique identifier of said Graphic Resource.

The Abstract Graphic Resource created a step S310 stores a unique identifier of the Graphic Resource on each Graphic Card of the system. In practice, the Abstract Graphic Resource may further store an identifier for each Graphic Card of the system; one identifier for one Graphic Card. Hence, the Abstract Graphic Resource handles the identifiers of the Graphics Resources together with the identifiers of the Graphic Cards on which the Graphic Resources are loaded. The identifiers may be, but are not limited to, digits, alphanumeric characters . . . For instance, each Graphic Cards may be bounded to a key implemented as an integer: its numerical value is 1 for the Graphic Card 1, 2 for the Graphic Card 2, n for the Graphic Card n, and so on.

The identifiers of the Graphic Resources are obtained upon queries of the Render Engine on the Graphic Library. In an example, the lower layer of the Render Engine accesses the Graphic Library that has created the Graphic Resource, and the Graphic Library provides the identifier of the graphic resource on one of the Graphic Cards of the system. Once the lower layer has obtained the identifier, it is provided to the abstract layer. Preferably, all the identifiers of a given Graphic Resource are queried at once for improving the creation speed of the Abstract Graphic Resource.

In practice, the identifier of a Graphic Resource on a Graphic Card is also referred to as Resource Name. The Resource Name is created by the Graphic Library at the time the Graphic Data is transformed into Graphic Resource.

Next, at step S320, the Abstract Graphic Resource is stored in a table, e.g. the table is stored on a memory of the system. The table may be already existing; in this case, the table is completed with the new Abstract Graphic Resource. In the event no table exists, then it is created first (that is, the table is available in memory) and then completed with the new Abstract Graphic Resource. In practice, the Render Engine is a software that when executed is loaded in memory, and the executed Render Engine comes with a table for storing Abstract Graphic Resources. Thus, the Render Engine will be provided with an access to the table (S340) that stores the Abstract Graphic Resources created as a result of the loading of the 3D scene. By this way, the Render Engine is able to handle (or manage) the graphic data of the 3D scene.

Then, at step S330, the Graphic Resource (that is now identified on each Graphic Card of the system through the Abstract Graphic Resource) is copied on each Graphic Card of the system. It is to be understood that the information copied on a Graphic Card can be exploited by said Graphic Card, that is, the Graphic Resource is an object furnished by the Graphic Library on which operations can be performed by at least one Graphical Processing Unit of the Graphic Card. The copy of a Graphic resource to a graphic card is performed as known in the art, e.g. the graphic resource is stored on memory of the Graphic Card. And at step S340, the Render Engine can an access to the table that stores the Abstract Graphic Resources created as a result of the loading of the 3D scene.

Referring now to FIGS. 4 to 6, it is discussed an example of steps S300 to S330 when the Render Engine receives an order of an application. A Render Engine order is a command that the Render Engine must execute. An order can be for example to draw a geometry or clear the screen with a specific color. An order can come from a user (e.g. through an application preforming display requests) using the Render Engine or directly from the Render Engine depending on how the Render Engine is structured. In a common Render Engine, an order is typically composed of an action (Draw, Clear . . . ) and one or more Resource Names that identify Graphic Resources (for example the geometry Graphic Resource to draw). In the present invention, the abstract layer of the Render Engine replaces in an order to be executed the Resource Name of the Graphic Resource by the Abstract Graphic Resource associated to the Graphic Resource. The order will be executed according to the number of Graphic Cards of the system. For instance, if the system comprises eight Graphic Cards, the order will be executed eight times; one execution for one Graphic Card.

In FIG. 4, the relationships between the Abstract Graphic Resource, the Resource Names and Graphic Cards are represented. A Graphic Data has been loaded (when loading the 3D scene) on the Render Engine upon application's request. An Abstract Graphic Resource has been created as a result of the loading of the Graphic Data. The Abstract Graphic Resource represents the Graphic Resource (computed by the Graphic Library from the loaded Graphic Data) on two Graphic Cards of the computer system: the Graphic Card 1 and the Graphic Card 2. Each Graphic Resource has a unique identifier also referred to as Resource Name; here the Graphic Resource has a Resource Name 1 on the Graphic Card 1 and a Resource Name 2 on the Graphic Card 2. It is to be understood that the copy of Graphic Resource on the Graphic Cards might be performed before the creation of the Abstract Graphic Resource; that is, step S330 is performed before step S310. Performing step S310 before step S330 improves the association of the Graphic resources on the Graphic Cards and also the creation and management of the Abstract Graphic Resource.

FIG. 6 shows the steps performed when a Graphic Data is loaded to the Render Engine. The created Abstract Graphic Resource represents the n Resource Names of the Graphic Resource, each Resource Name being associated with one of the n Graphic Cards. The Graphics Resources are copied on the Graphic Cards. Once the copy is finished (step S330), the Abstract Graphic Resource previously created (step S320) is returned to the application. The use of the Abstract Graphic Resource instead of a Resource Name is transparent for the application that is not aware that the Abstract Graphic Resource represents more than one Graphic Resource. Thus no modification of the application is required, the creation/management of the Abstract Graphic Resource being performed by the abstract layer of the Render Engine. The abstract layer may be configured to provide to the upper layer the abstract graphic resource that was created. By this way the application can be directly informed of the creation of the new Abstract Graphic Resource via the upper layer the application can access. This allows hiding the complexity of the graphic cards management and working as if there were only one graphic card in the system.

Referring now to FIG. 5, an example of an architecture used for storing and managing the created Abstract Graphic Resource is now depicted. The architecture of this example is similar to a double entry tabular with Abstract Graphic Resources that are used to search the good row of the table, and the Graphic Card identifiers (also referred to as Key for Graphic Card) are used to search the good column of the table. For instance, the abstract handle 40 allows to identify the row 42 of the table that comprises several columns 42 a-42 c, each column storing one Graphic Cards identifiers. Now, from the columns, it is possible to obtain all Resource Names (that is, the Resource Name on each Graphic Card) of the Graphic Resource. In practice, the Resource Name can be stored on the table, e.g. on the rows 42 a-42 c together with the Graphic Cards' identifiers.

An example of Abstract Graphic Resource creation and use for displaying a 3D scene with two different points of view is now discussed. In this example, the system comprises two graphic Cards, and each Graphic Card will be in charge of displaying the 3D scene with one point of view. After an application requested the Render Engine to display the 3D scene with two different viewpoints, a Graphic Library order (also referred to as Graphic Library action) is received by the Render Engine. As seen previously, a viewpoint on a scene is a Graphic Resource is an object furnished by the Graphic Library and on which operations can be performed. And this viewpoint Graphic Resource can be requested by the application by sending an order to the Render Engine. In the example discussed, the application sends an order requesting two viewpoints on the same scene. The upper layer of the Render Engine is typically responsible of receiving orders of the application; said otherwise, the application has an access to the Render Engine via the upper layer. Once the order has been received, the Render Engine identifies the Abstract Graphic Resource that is concerned by this order, e.g. in the Abstract Graphic Resource is searched in the table. In practice, this is made possible because the Render Engine has provided to the application the Abstract Graphic Resource associated to the loaded Graphic data. The table row of the Abstract Graphic Resource is traversed in order to obtain the Resources Names on all the Graphic Cards: the Graphic Resources being known, the order can be executed by replacing in the order the Abstract Graphic Resource by the corresponding Resource Name. It is to be understood that the order is executed for each Graphic Card with the Resource Name of the Graphic resource stored on said each Graphic Card.

The deletion of an Abstract Graphic Resource is performed in a similar manner. The application sends to the Render Engine an order of deleting a Graphic Data. The order (or action) is received by the Render Engine as the application can access said Render Engine, e.g. through the upper layer of the Render Engine. The order is addressed to the Abstract Graphic Resource as the application identifies the Graphic Data (copied as Graphic Resources on the Graphic Cards) with the Abstract Graphic Resource. The Render Engine then queries the Abstract graphic resource table and identifies the identifiers of the Graphic Resources on the Graphic Cards of the system. The order can now be modified by replacing the Abstract Graphic Resource by the Graphic Resource found in the table, a new order been created for each Graphic Resource associated with the Abstract Graphic Resource. As a result, the delete order can be executed and the Graphic Resource erased of the Graphic Card memory.

Referring back to the flowchart of FIG. 2, at step S210, an identifier for each newly added graphic card is provided. As already discussed previously, the identifier of a Graphic Card may be, but are not limited to, digits, alphanumeric characters, and the identifiers of the Graphic Resources are obtained upon queries of the Render Engine on the Graphic Library.

The expression new Graphic Cards means that one or more further Graphic Cards are available on the computer (e.g. the system of FIG. 7); the further Graphic Cards are Graphic Cards not involved in the current rendering of the 3D scene.

A new Graphic Card can be added in several ways. For instance, a logical activation of a Graphic Card can be used, e.g. the graphic card is activated upon action of a piece of code. As another example, a physical activation can be performed, e.g. the graphic card is plugged to the system hosting the GCs.

The step S210 may be carried out upon request of the application that uses the Render Engine. For instance, further points of views one the 3D scene are requested by the application that is aware that new Graphic Cards can be used for rendering these further viewpoints. Alternatively, the application is not aware that new Graphic Cards are available, but the Render Engine does and it can propose the Application to exploit these new Graphic Cards. The Applicant and/or the Render Engine may have capabilities for logically activating one or more new Graphic Cards.

Then, one or more new Graphic Cards are selected at step S220. The selection of the new Graphic Card(s) is performed according to Application's needs and requirements. For instance, if three new viewpoints have to be rendered, then three new Graphic Cards will be selected. Thus, the selection of the new Graphic Cards may comprises selecting a number of new Graphic Cards according to the number of new viewpoints to render. The selection of the new Graphic Card(s) may be performed (or be performed in addition) according to the hardware capacity of each new Graphic Card, e.g. the GC with the more powerful GPU or the largest memory will be selected.

When new Graphic Cards are selected and are going to be used, the Render Engine is informed by the application by use of a specific order that configures the Render Engine. Thus, the present invention allows to significantly improve the management a multi-graphic cards system and thus improve dynamically the rendering of a scene.

Once the one or more Graphic Cards have been selected, the abstract graphic resource of each graphic data of the 3D scene is modified (S230) by adding a new identifier of the graphic resources for each newly added graphic card. It is to be understood that the newly added graphic cards are the one selected at step 5220. The creation of the new identifier for each graphic resource on each newly added graphic card is performed as discussed in reference to FIGS. 5 and 6.

Now that the graphic resources of the 3D scene are identified for each new GCs through the abstract graphic resource, the graphic data that are already stored on the GC(s) are transferred on each newly added graphic cards (S240). The term transfer means that a copy of the graphic data is stored on each newly added graphic card.

The transfer may be performed from the original graphic data provided by the Application according to the capabilities of the Graphic Library as known is the art.

Alternatively, the transfer may be performed by copying the graphic data that is already stored on one of the graphic cards from this Graphic Cards to all the new Graphic Cards (the selected one at step S220). In this case, a selection of one of the graphics cards that already stores the graphic data of the scene is performed. The way the transfer is carried out may vary depending on the type of graphic data. In a first example that is the most generic scenario (most of the Graphic data can be transferred using this scenario), the graphic data are retrieved from the GPU of the selected Graphic Card. In practice, this means that the graphic data are stored in a memory of the GPU, and that they are copied from this memory to the memories of the new Graphic Cards. This operation is done with the use of a dedicated function that is provided by the Graphic Library, as known in the art. As a result, a physical resource is created on each newly added Graphic Cards. In a second example, the graphic data cannot be directly retrieved from the GPU as in the former example; for instance, the Graphic Data are buffers or textures. With such types of graphic data, particular functions of the Graphical Library are used to get the data: specific Graphic Library calls are used for retrieving data from the GPU memory. For instance, functions in the Graphic Library allow the user to copy the content of the Video memory of a selected graphic card to central memory which in turn allows the user to copy the data to another graphic card. Other methods can be chosen depending of the capabilities of the graphic library.

The interactions between the layers of the Render Engine have been discussed in view of the creation of new graphic resources, as illustrated in the examples of FIG. 3 to 6. In the present invention, the abstract graphic resources already exist and are modified when one or more supplementary Graphic Cards are used for rendering a 3D scene. The interactions between the layers of the Render Engine are the same. Hence, the identifier of each newly added Graphic Card is obtained by use of the Graphic Library that is accessed through the lower layer of the Render Engine. The identifier is then provided to the abstract layer. The abstract layer of the Render Engine stores and manages the Abstract graphic resources. For instance, the modifications of the abstract graphic resources involves that the table that stores the abstract graphic resource is modified and that the Render Engine has an access to the table that stores the abstract graphic resource to be modified. 

1. A computer-implemented method for modifying a number of graphic cards used for rendering a scene, a graphic card comprising one or more graphic processing units, comprising: providing a scene that is already loaded in a render engine, the scene comprising at least one graphic data to be used for rendering a view of the scene; modifying an abstract graphic resource for a graphic resource of the at least one graphic data, the abstract graphic resource storing an identifier of the graphic resource for each graphic card, by adding a new identifier of the said graphic resource for each newly added graphic card; and transferring, on each newly added graphic card, the said at least one graphic data already stored on one of the graphic cards.
 2. The computer-implemented method of claim 1, wherein the transfer, on each newly added graphic card, of the said at least one graphic data already stored on one of the graphic cards comprises: selecting one of the graphic cards that stores the said at least one graphic data; retrieving, on a GPU of the selected graphic card, data of the said at least one graphic data; and copying the data obtained from the GPU to each newly added graphic card.
 3. The computer-implemented method of claim 1, wherein the Render Engine comprises at least two logical layers, an upper layer providing to an application with access to the Render Engine and a lower layer providing the Render Engine with access to a graphic library, and wherein the modification of the abstract graphic resource is performed by an abstract layer comprised between the upper layer and the lowest layer.
 4. The computer-implemented method according to claim 2, wherein the transfer further comprises, after the selection of one of the graphic cards: requesting, by the graphic library, data on the GPU of the selected graphic card, and wherein the data of the said at least one graphic data is retrieved on the GPU of the selected graphic card as a result of the request of the graphic library.
 5. The computer-implemented method of claim 4, further comprising, before the modification of the abstract graphic resource: accessing on the graphic library, by the lower layer, an identifier for each newly added graphic card; and providing the identifier of each newly added graphic card to the abstract layer.
 6. The computer-implemented method of claim 5, wherein the modified abstract graphic resource stores the identifier of the graphic resource with the provided one or more identifiers.
 7. The computer-implemented method of claim 1, wherein the step of modifying the abstract graphic resource further comprises modifying a table that stores the abstract graphic resource, and wherein the modification of the abstract graphic resource comprises providing to the Render Engine with an access to the table that stores the abstract graphic resource to be modified.
 8. A Render Engine computer program comprising instructions for performing the method of claim
 1. 9. A non-transitory computer readable storage medium having recorded thereon a Render Engine computer program that when executed by a computer causes the computer to implement a method for modifying a number of graphic cards used for rendering a scene, a graphic card comprising one or more graphic processing units, comprising: providing a scene that is already loaded in a render engine, the scene comprising at least one graphic data to be used for rendering a view of the scene; modifying an abstract graphic resource for a graphic resource of the at least one graphic data, the abstract graphic resource storing an identifier of the graphic resource for each graphic card, by adding a new identifier of the said graphic resource for each newly added graphic card; and transferring, on each newly added graphic card, the said at least one graphic data already stored on one of the graphic cards.
 10. A system comprising: processing circuitry coupled to a memory, the memory having recorded thereon a Render Engine computer program for modifying a number of graphic cards used for rendering a scene, a graphic card comprising one or more graphic processing units, that when executed causes the processing circuitry to be configured to provide a scene that is already loaded in a render engine, the scene comprising at least one graphic data to be used for rendering a view of the scene, modifying an abstract graphic resource for a graphic resource of the at least one graphic data, the abstract graphic resource storing an identifier of the graphic resource for each graphic card, by adding a new identifier of the said graphic resource for each newly added graphic card, and transferring, on each newly added graphic card, the said at least one graphic data already stored on one of the graphic cards. 